package com.jiangyao.model.dto;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;

@Data
@ApiModel(value = "成员Dto")
public class UserDto implements BaseDTO {

	public interface Login {
	}

	public interface Register {

	}

	public interface RegisterIdCard {

	}


	@ApiModelProperty(value = "成员ID")
	@NotNull(message = "成员ID不能为空", groups = {Edit.class})
	private Integer userId;

	@ApiModelProperty(value = "成员名称")
	@NotNull(message = "成员名称不能为空", groups = {Register.class})
	@NotEmpty(message = "成员名称不能为空", groups = {Register.class})
	@NotNull(message = "成员名称不能为空", groups = {RegisterIdCard.class})
	@NotEmpty(message = "成员名称不能为空", groups = {RegisterIdCard.class})
	private String userName;

	@ApiModelProperty("手机")
	@NotNull(message = "成员手机不能为空", groups = {Login.class,Register.class})
	@NotEmpty(message = "成员手机不能为空", groups = {Login.class,Register.class})
	@NotNull(message = "成员手机不能为空", groups = {RegisterIdCard.class})
	@NotEmpty(message = "成员手机不能为空", groups = {RegisterIdCard.class})
	private String userPhone;

	@ApiModelProperty("验证码")
	@NotNull(message = "验证码不能为空", groups = {Login.class,Register.class})
	@NotEmpty(message = "验证码不能为空", groups = {Login.class,Register.class})
	private String verification;

	@ApiModelProperty("身份证号")
	@NotNull(message = "身份证号不能为空", groups = {Register.class})
	@NotEmpty(message = "身份证号不能为空", groups = {Register.class})
	@NotNull(message = "身份证号不能为空", groups = {RegisterIdCard.class})
	@NotEmpty(message = "身份证号不能为空", groups = {RegisterIdCard.class})
	private String idCard;

	@ApiModelProperty("职位")
	private String position;

	@ApiModelProperty("unionId")
	private String unionId;

	@ApiModelProperty("openId")
	private String openId;


	@ApiModelProperty("密码")
	private String password;

	@ApiModelProperty("code")
	private String code;

	@ApiModelProperty("待注册用户来源")
	private String source;
}
